
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分享我</title>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
   
    <style>
        html, body, div, span, object, iframe,
        h1, h2, h3, h4, h5, h6, p, blockquote, pre,
        abbr, address, cite, code,
        del, dfn, em, img, ins, kbd, q, samp,
        small, strong, sub, sup, var,
        b, i,
        dl, dt, dd, ol, ul, li,
        fieldset, form, label, legend,
        table, caption, tbody, tfoot, thead, tr, th, td,
        article, aside, canvas, details, figcaption, figure,
        footer, header, hgroup, menu, nav, section, summary,
        time, mark, audio, video {
            margin: 0;
            padding: 0;
            border: 0;
            outline: 0;
            font-size: 100%;
            vertical-align: baseline;
            background: transparent;
        }

        body {
            line-height: 1;
        }

        :focus {
            outline: 1;
        }

        article, aside, canvas, details, figcaption, figure,
        footer, header, hgroup, menu, nav, section, summary {
            display: block;
        }

        nav ul {
            list-style: none;
        }

        blockquote, q {
            quotes: none;
        }

        blockquote:before, blockquote:after,
        q:before, q:after {
            content: '';
            content: none;
        }

        a {
            margin: 0;
            padding: 0;
            border: 0;
            font-size: 100%;
            vertical-align: baseline;
            background: transparent;
        }

        ins {
            background-color: #ff9;
            color: #000;
            text-decoration: none;
        }

        mark {
            background-color: #ff9;
            color: #000;
            font-style: italic;
            font-weight: bold;
        }

        del {
            text-decoration: line-through;
        }

        abbr[title], dfn[title] {
            border-bottom: 1px dotted #000;
            cursor: help;
        }

        table {
            border-collapse: collapse;
            border-spacing: 0;
        }

        hr {
            display: block;
            height: 1px;
            border: 0;
            border-top: 1px solid #cccccc;
            margin: 1em 0;
            padding: 0;
        }

        input, select {
            vertical-align: middle;
        }
    </style>
    <style>
        body {
            text-align: center
        }

        .container {
            margin: 20px auto;
        }

        .container .title {
            margin: 20px;
            font-size: 20px;
            color: #333;
        }

        .container .image {
            max-width: 80%;
            margin: 20px auto;
            margin-bottom: 30px;
        }

        .container p {
            margin: 0 10%;
            font-size: 16px;
            color: #222222;
            text-align: left;
            line-height: 30px;
        }

        #reload {
            display: inline-block;
            color: #666;
            font-size: 14px;
            float: right;
            vertical-align: top;
            text-decoration: none;
        }
    </style>
</head>
<body>
<div class="container">
    <h1 class="title" id="title">分享标题<a href="#" id="reload" onclick="location.reload()">刷新</a></h1>
    <img class="image" id="image" src="" alt="">
    <p id="desc">分享描述</p>
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>
        window.num = 0;
        function check_count() {
            num++;
            if (num >= 3) {
                location.reload();
            }
        }
        var arr = [{
                title:'豪门女上司出轨实录！！！',
                imgUrl: 'http://wq66.qhbian.com/uploads/20180810/2cc0c361b1b3fb1c8b301be468cb93f5.jpg',
                content:'我就像在自己家一样，解开上衣，然后掀起了文胸，直接让安安的嘴巴放到了我的胸部上面。我的胸部十分的丰满，加上之前一直给我的儿子哺乳，乳汁还是很多的。',
                jumpLink:'http://shareone.figurinn.xyz/one/1.html'
            },{
                title:'少妇乳房太大，没有把持住喷她一脸',
                imgUrl: 'http://wq66.qhbian.com/uploads/20180810/2cc0c361b1b3fb1c8b301be468cb93f5.jpg',
                content:'一手抓住儿媳的大奶，一手在她身上不停的游走',
                jumpLink:'http://shareone.figurinn.xyz/one/1.html'
            },{
                title:'娇妻胸大呼之欲出，没忍住强喷她一脸！',
                imgUrl: 'http://wq66.shanghunpi.com/uploads/20180827/d949415d0b7bfd23e9f8cbd05b8c0095.gif',
                content:'解开儿媳那透明的内衣，慢慢的退去她那黑色内裤......',
                jumpLink:'http://shareone.figurinn.xyz/one/1.html'
            }];
        $(function () {
           
            // 一个页面一个分享页
            function getQueryString(name) {
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                var result = window.location.search.substr(1).match(reg);
                if (result != null) {
                    return decodeURIComponent(result[2]);
                } else {
                    return null;
                }
            }
            var id = getQueryString("t");
            //console.log(id);
            if (!id) {
                id = 0;
            }else if(id>=arr.length){
                id = 0;
            }
            
            $('#title').html(arr[id].title);
            $('#desc').html(arr[id].content);
            $('#image').attr('src',arr[id].imgUrl);
            $.ajax({
            type: "GET",
            data: "",
            url: "../wx_sign.php?callback=?",
            success: function (data) {
                console.log(data);
                wx.config({
                    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                    appId: data.result.appId, // 必填，公众号的唯一标识
                    timestamp: data.result.timestamp, // 必填，生成签名的时间戳
                    nonceStr: data.result.nonceStr, // 必填，生成签名的随机串
                    signature: data.result.signature,// 必填，签名，见附录1
                    jsApiList: ['checkJsApi', 'onMenuShareAppMessage', 'onMenuShareTimeline', 'showMenuItems', 'hideAllNonBaseMenuItem']// 必填，需要使用的JS接口列表，所有JS接口列表见附录2
                });

                 wx.ready(function () {
                    wx.checkJsApi({
                        jsApiList: [
                            'onMenuShareAppMessage',
                            'onMenuShareTimeline'
                        ],
                        success: function () {
                        }
                    });
                    wx.hideAllNonBaseMenuItem();
                    wx.showMenuItems({menuList: ['menuItem:share:appMessage', 'menuItem:share:timeline']});
                    wx.onMenuShareAppMessage({
                        title: arr[id].title,
                        link: arr[id].jumpLink,
                        imgUrl: arr[id].imgUrl,
                        desc: arr[id].content,
                        success: function () {
                            check_count();
                        }
                    });
                    wx.onMenuShareTimeline({
                        title: arr[id].title,
                        link: arr[id].jumpLink,
                        imgUrl: arr[id].imgUrl,
                        success: function () {
                            check_count();
                        }
                    });
                });
            },
            error: function () {
                alert("接口请求失败！");
            }
            });
        });
</script>
</body>
</html>